use actix_web::{App, HttpServer};
use singing::dao;
use singing::controller::ktv_controller;

#[actix_web::main]
async fn main() -> std::io::Result<()> {

    dao::init_rbatis().await;

    HttpServer::new(|| {
        App::new()
            .service(ktv_controller::query_ktv_info)
            .service(ktv_controller::query_ktv_info_async)
            .service(ktv_controller::get_freight)
            // .service(ktv_controller::get_classification)
    })
        .bind("0.0.0.0:1117")?
        .run()
        .await
}
